import enum

import pygame

from Actors.Chinese import ChineseSoldier
from Actors.Lead_Actor import LeadActor
from Dialog.Dialog_For_Systerm import TunnelTask1BeginDialog
from Scene.Base_Scene import ScenePassStatus
from Scene.Main_Scene import MainScene
from Task.Task1.Task_Collect import CollectTask
from Task.Task1.Task_Fight import FightTask
from Task.Task1.Task_KillJapanese import KillJapaneseTask
from Scene.Win_Scene import WinScene
from Scene.Fail_Scene import FailScene


class Task3Scene(MainScene):
    def __init__(self):
        # 主角
        self.lead_actor = LeadActor(0, 0)
        # 队长
        self.captain = ChineseSoldier(0, 0)
        # 副队长
        self.vice_captain = ChineseSoldier(0, 0)
        # 背景和地图
        self.background_path = "./Resources/tmx/任务3场景.png"
        self.tiled_map_data = "./Resources/tmx/任务3场景.tmx"
        # 加载字幕
        self.font = pygame.font.Font("./Resources/font/迷你简粗宋.TTF", 15)
        self.tasks = []
        self.task_id = 0

        super(Task3Scene, self).__init__(self.lead_actor, self.background_path, self.tiled_map_data)

    def init_task(self):
        """
        初始化任务
        :return:
        """
        self.tasks.append(FightTask(self.lead_actor, self.prizes_group, self.captain, self.vice_captain, self.font))

    def get_next_status(self):
        """
        获取下一状态
        :return:
        """

        if self.next_status == ScenePassStatus.final_win:
            return self.next_status, "WinScene"
        elif self.next_status == ScenePassStatus.final_fail:
            return self.next_status, "FailScene"
        else:
            return self.next_status, None
